<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <input type="text" v-model="msg">
    {{msg}}
    <hr>
    <label for="male">男</label>
    <input type="radio" value="男" id="male" v-model="gender">
    <label for="female">女</label>
    <input type="radio" value="女" id="female" v-model="gender">
    <br>
    {{ gender }}
    <hr>
    <!-- 复选框 -->
    爱好：
    <label for="sing">唱</label>
    <input type="checkbox" value="唱" id="sing" v-model="hobbies">
    <label for="dance">跳</label>
    <input type="checkbox" value="跳" id="dance" v-model="hobbies">
    <label for="rap">rap</label>
    <input type="checkbox" value="rap" id="rap" v-model="hobbies">
    <label for="bst">篮球</label>
    <input type="checkbox" value="篮球" id="bst" v-model="hobbies">
    <br>
    {{hobbies}}
    <!-- 复选框单独使用 希望绑定是 checked属性 -->
    <hr>
    你是美女吗?
    <input type="checkbox" v-model="isBeauty">
    {{ isBeauty? '你是大美女，微信多少?': '你是好姑娘，可以找到更好的' }}
    <hr>
    <select multiple v-model="city">
      <option value="合肥">合肥</option>
      <option value="芜湖">芜湖</option>
      <option value="马鞍山">马鞍山</option>
      <option value="蚌埠">蚌埠</option>
    </select>
    {{city}}
  </div>
  <script src="./vue.global.js"></script>
  <script>
    // const title = '这是js全局变量';
    const { createApp } = Vue;
    const app = createApp({
      data(){
        return {
          msg: '初始值',
          gender: '男',
          hobbies: ['唱', '篮球'],
          isBeauty: true,
          city: ['合肥']
        }
      }
    })
    app.mount('#app')
  </script>
</body>
</html>